/*
* Copyright (c) 2014 Qunar.com. All Rights Reserved.
*/
package net.oschina.bilbodai.concurrent.core.converter;

import java.lang.reflect.Array;

/**
 * @author daimao  Date: 15/10/14 Time: 下午2:52
 * @version $Id$
 */
public class ArrayLengthRateConverter extends IndexArgRateConverter {

    public ArrayLengthRateConverter(int argIndex) {
        super(argIndex);
    }

    @Override
    public int acquire(Object[] args) {
        Object array = args[getArgIndex()];
        return Array.getLength(array);
    }
}